<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<input type="text" id="input_text" value="avc" />
		<script type="text/javascript">
			let a = 1;
			console.log(a);
			let input_text = document.getElementById("input_text");
			let val = input_text.value;
			console.log(typeof(parseInt(val)));
			console.log(parseInt(val));
			let e;
			console.log(typeof(e) === 'undefined');
			a = isNaN(aaa(val)) ? 10 : aaa(val);
			console.log(a);
			//输出使用双引号包裹的B字母
			console.log("\"B\"");
			//只能在JS中
			console.log('"B"');
			console.log("'B'");
			const b = "haha";
			console.log(b);
			// b = "hehe";
			
			console.log(1 / a);
			console.log(0 / a);
			console.log(12 / 0 * 0);
			let c = 2;
			if(c){
				console.log("0数字");
			}
			let d = null;
			console.log(d);
			if(d) {
				console.log("字符串判断");
			}
			/**
			 * 加法
			 * @param {Object} val 增量
			 */
			function aaa(val) {
				return val;
			}
			
			console.log(1 + 2 + "3");
			console.log(1 + 2 + "3" + 4 + 5 + 6);
			let x = 1;
			console.log(++x);
			console.log(x++);
			console.log(x);
			let y = 2;
			console.log(x > 1 && y > 1);
			console.log(y-- > 1 && ++x > 1);//y:1,x:4
			console.log(--y > 1 && ++x > 1);//y:0,x:4
			console.log(--y > 1 & ++x > 1);//y:-1,x:5
			console.log(y,x);
			let k = 2;//0010
			console.log(k<<2);//往左边移2位，右边补0。1000
			
		</script>
	</body>
</html>
